package com.janko.springbootbase.designmode.abstractFactory;

/**
 * @Description 类文件说明
 * @Author nieyankang
 * @Version 1.0
 * @date {date} {time}
 */
public class AMainTest {
    public static void main(String[] args) {
        //第一条生产线，女性生产线
        HumanFactory womanHumanFactory = new WomanHumanFactory();

        //第二条生产线，男性生产线
        HumanFactory manHumanFactory = new ManHumanFactory();

        //生产线建立完毕，开始生产人了:
        Human manYellowHuman = manHumanFactory.createYellowHuman();

        Human femaleYellowHuman = womanHumanFactory.createYellowHuman();

        manYellowHuman.cry();
        manYellowHuman.sex();
        femaleYellowHuman.laugh();
        femaleYellowHuman.sex();
    }
}
